$OpenBSD: patch-src_backends_R_CMakeLists_txt,v 1.1 2015/05/02 09:48:12 zhuk Exp $
--- src/backends/R/CMakeLists.txt.orig	Sat May  2 11:56:43 2015
+++ src/backends/R/CMakeLists.txt	Sat May  2 12:32:12 2015
@@ -1,5 +1,5 @@
-include_directories(${R_INCLUDEDIR})
-LINK_DIRECTORIES(${R_SHAREDLIBDIR})
+include_directories(${R_INCLUDE_DIR})
+LINK_DIRECTORIES(${R_SHARED_LIB_DIR})
 
 add_subdirectory(rserver)
 
@@ -21,8 +21,8 @@ QT4_ADD_DBUS_INTERFACE(RBackend_SRCS ${network_xml} rs
 kde4_add_ui_files(RBackend_SRCS settings.ui)
 
 kde4_add_plugin( cantor_rbackend ${RBackend_SRCS} )
-set_target_properties( cantor_rbackend PROPERTIES INSTALL_RPATH_USE_LINK_PATH false)
-target_link_libraries( cantor_rbackend ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS} cantorlibs ${R_USED_LIBS})
+set_target_properties( cantor_rbackend PROPERTIES INSTALL_RPATH_USE_LINK_PATH true)
+target_link_libraries( cantor_rbackend ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS} cantorlibs ${R_LIBRARIES})
 
 install( FILES rbackend.desktop  DESTINATION ${SERVICES_INSTALL_DIR}/cantor)
 install(TARGETS cantor_rbackend DESTINATION ${PLUGIN_INSTALL_DIR})
